<ix-page-header [loading]="!!(dataProvider.isLoading$ | async)">
  <ix-search-input1
    [value]="filterString()"
    (search)="onListFiltered($event)"
  ></ix-search-input1>

  <button
    *ixRequiresRoles="requiredRoles"
    mat-button
    ixTest="bootenv-stats"
    [ixUiSearch]="searchableElements.elements.stats"
    (click)="openBootenvStats()"
  >
    {{ 'Stats/Settings' | translate }}
  </button>

  <button
    mat-button
    ixTest="bootenv-status"
    [routerLink]="['/', 'system', 'boot', 'status']"
  >
    {{ 'Boot Pool Status' | translate }}
  </button>

  <button
    *ixRequiresRoles="requiredRoles"
    mat-button
    ixTest="bootenv-scrub"
    [ixUiSearch]="searchableElements.elements.scrubBootPool"
    (click)="doScrub()"
  >
    {{ 'Scrub Boot Pool' | translate }}
  </button>
</ix-page-header>

@if (selectedBootenvs.length) {
  <div class="batch-actions-toolbar">
    <div class="title">
      <strong>{{ 'Batch Operations' | translate }}</strong>
    </div>
    <div class="actions">
      <button
        *ixRequiresRoles="requiredRoles"
        mat-button
        ixTest="delete"
        [disabled]="!selectionHasItems"
        (click)="doDelete(selectedBootenvs)"
      >
        <ix-icon name="mdi-delete"></ix-icon>
        {{ 'Delete' | translate }}
      </button>
    </div>
  </div>
}

<ix-table
  class="table"
  [ix-table-empty]="!(dataProvider.currentPageCount$ | async)"
  [emptyConfig]="emptyService.defaultEmptyConfig(dataProvider.emptyType$ | async)"
  [ixUiSearch]="searchableElements.elements.boot"
>
  <thead
    ix-table-head
    [columns]="columns"
    [dataProvider]="dataProvider"
  ></thead>
  <tbody
    ix-table-body
    [columns]="columns"
    [dataProvider]="dataProvider"
    [isLoading]="!!(dataProvider.isLoading$ | async)"
  >
  </tbody>
</ix-table>
<ix-table-pager [dataProvider]="dataProvider"></ix-table-pager>
